syntax = "proto3";

package wandb_internal;

import "wandb/proto/wandb_base.proto";
import "wandb/proto/wandb_internal.proto";
import "wandb/proto/wandb_settings.proto";

message ServerShutdownRequest {
  _RecordInfo _info = 200;
}

message ServerShutdownResponse {}

message ServerStatusRequest {
  _RecordInfo _info = 200;
}

message ServerStatusResponse {}

message ServerInformInitRequest {
  Settings settings = 1;
  _RecordInfo _info = 200;
}

message ServerInformInitResponse {}

message ServerInformStartRequest {
  Settings settings = 1;
  _RecordInfo _info = 200;
}

message ServerInformStartResponse {}

message ServerInformFinishRequest {
  _RecordInfo _info = 200;
}

message ServerInformFinishResponse {}

message ServerInformAttachRequest {
  _RecordInfo _info = 200;
}

message ServerInformAttachResponse {
  Settings settings = 1;
  _RecordInfo _info = 200;
}

message ServerInformDetachRequest {
  _RecordInfo _info = 200;
}

message ServerInformDetachResponse {}

message ServerInformTeardownRequest {
  int32 exit_code = 1;
  _RecordInfo _info = 200;
}

message ServerInformTeardownResponse {}

/*
 * ServerRequest, ServerResponse: used in sock server
 */

message ServerRequest {
  oneof server_request_type {
    Record record_publish = 1;
    Record record_communicate = 2;
    ServerInformInitRequest inform_init = 3;
    ServerInformFinishRequest inform_finish = 4;
    ServerInformAttachRequest inform_attach = 5;
    ServerInformDetachRequest inform_detach = 6;
    ServerInformTeardownRequest inform_teardown = 7;
    ServerInformStartRequest inform_start = 8;
  }
}

message ServerResponse {
  oneof server_response_type {
    Result result_communicate = 2;
    ServerInformInitResponse inform_init_response = 3;
    ServerInformFinishResponse inform_finish_response = 4;
    ServerInformAttachResponse inform_attach_response = 5;
    ServerInformDetachResponse inform_detach_response = 6;
    ServerInformTeardownResponse inform_teardown_response = 7;
    ServerInformStartResponse inform_start_response = 8;
  }
}
